package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.itheima.domain.db.BlackList;
import com.itheima.domain.db.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

// 黑名单
public interface BlackListMapper extends BaseMapper<BlackList> {
    //方法名称  方法参数    方法的返回值
    @Select("SELECT * FROM tb_user_info tui , tb_black_list tbl WHERE tui.id=tbl.`black_user_id` AND tbl.`user_id`=#{userId}")
    IPage<UserInfo> findBlackListByUserId(IPage page,@Param("userId") Long userId);
}

//SELECT * FROM tb_user_info tui , tb_black_list tbl  WHERE tui.id=tbl.`black_user_id` AND tbl.`user_id`=110